package com.hdaccp.rabbitmq11.service;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

import java.util.HashMap;

@Service
public class MyService {
    @RabbitListener(queues = "q3")
    public void receive(HashMap<String,Object> map){
        System.out.println(map.get("msg") + " ------- q3");

    }

    @RabbitListener(queues = "q2")
    public void receiveQ2(HashMap<String,Object> map){
        System.out.println(map.get("msg") + " ------- q2");

    }

    @RabbitListener(queues = "q1")
    public void receiveQ1(HashMap<String,Object> map){
        System.out.println(map.get("msg") + " ------- q1");

    }

}
